<?php

namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;

/**
 * App\User
 *
 * @property int $id
 * @property string $name
 * @property string $email
 * @property string $password
 * @property int $honor_point
 * @property string $nick_name
 * @property string $slogan
 * @property string $avatar_image
 * @property string $remember_token
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property int $github_id
 * @property string $github_token
 * @property string $github_name
 * @property string $github_nickname
 * @property string $github_email
 * @property string $github_avatar
 * @property string $github_json
 * @property int $weibo_id
 * @property string $weibo_token
 * @property string $weibo_name
 * @property string $weibo_nickname
 * @property string $weibo_email
 * @property string $weibo_avatar
 * @property array $weibo_json
 * @property int $qq_id
 * @property string $qq_token
 * @property string $qq_name
 * @property string $qq_nickname
 * @property string $qq_email
 * @property string $qq_avatar
 * @property string $qq_json
 * @property int $weixin_id
 * @property string $weixin_token
 * @property string $weixin_name
 * @property string $weixin_nickname
 * @property string $weixin_email
 * @property string $weixin_avatar
 * @property string $weixin_json
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Task[] $tasks
 * @method static \Illuminate\Database\Query\Builder|\App\User whereAvatarImage($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereEmail($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubAvatar($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubEmail($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubJson($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubNickname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereGithubToken($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereHonorPoint($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereNickName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User wherePassword($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqAvatar($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqEmail($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqJson($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqNickname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereQqToken($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereRememberToken($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereSlogan($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboAvatar($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboEmail($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboJson($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboNickname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeiboToken($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinAvatar($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinEmail($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinJson($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinNickname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\User whereWeixinToken($value)
 * @mixin \Eloquent
 * @property string $deleted_at
 * @method static \Illuminate\Database\Query\Builder|\App\User whereDeletedAt($value)
 */
class User extends Authenticatable
{

    protected $casts = [
        'weibo_json' => 'array',
    ];
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

    /**
     * Get all of the tasks for the user.
     */
    public function tasks()
    {
        return $this->hasMany(Task::class);
    }
}
